

using System.Net;

namespace LyxWaf.Services.WafInfo;

public class WafInfoOptions
{
    public List<OneLintenInfo> Listens { get; set; } = [];
    public List<OneCertInfo> Certs { get; set; } = [];

    public void Init() {
        if(Listens.Count == 0) {
            Listens.Add(new OneLintenInfo {
                Host = "127.0.0.1",
                Port = 7030
            });
        }
    }
}

public class OneLintenInfo
{
    public string Host { get; set; } = "127.0.0.1";
    public int Port { get; set; } = 80;
    public bool IsHttps { get; set; } = false;
}

public class OneCertInfo
{
    public string Host { get; set; } = "*";
    public string PemFile { get; set; } = "";
    public string? KeyFile { get; set; } = null;
}